package com.rd.sys.dto.commmon.enums;

import java.util.HashMap;
import java.util.Map;

import baseproj.common.constants.BaseEnum;

/**
 * The Class AreaEnum.
 * 
 * @ClassName: areaEnum
 * @Description: 区域枚举
 * @author:
 * @date: 2014-1-26 上午11:12:26
 */
public class AreaEnum {
    // 顶级区域的levelcode
    /** The Constant TOPLEVELCODE. */
    public final static String TOPLEVELCODE = "0001";

    /**
     * 地区级别.
     */
    public enum AreaLevel implements BaseEnum {
        /** The GOURP. */
        GOURP("0", "GOURP"), // 集团

        /** The Country. */
        Country("1", "Country"), // 国家

        /** The City. */
        City("2", "City"); // 城市

        /** The code. */
        public String code;

        /** The name. */
        public String name;

        /**
         * Instantiates a new area level.
         * 
         * @param code
         *            the code
         * @param name
         *            the name
         */
        AreaLevel(String code, String name) {
            this.code = code;
            this.name = name;
        }

        /** The code map. */
        public static Map<String, String> codeMap = new HashMap<String, String>();
        static {
            for (int i = 0; i < values().length; i++) {
                codeMap.put(values()[i].code, values()[i].name);
            }
        }

        /**
         * Gets the code.
         * 
         * @return the code
         */
        @Override
        public String getCode() {
            return code;
        }

        /**
         * Gets the name.
         * 
         * @return the name
         */
        @Override
        public String getName() {
            return name;
        }
    }

    /**
     * BSS同步接口--levelcode.
     */
    public enum BSSLevelCodeEnum {

        /** The group. */
        Group("1", "0001"),
        /** The South africa. */
        SouthAfrica("11", "00010001"),
        /** The Nigeria. */
        Nigeria("12", "00010002"),
        /** The Uganda. */
        Uganda("13", "00010003"),
        /** The Rwanda. */
        Rwanda("14", "00010004");

        /** The code. */
        public String code;

        /** The name. */
        public String name;

        /**
         * Instantiates a new bSS level code enum.
         * 
         * @param code
         *            the code
         * @param name
         *            the name
         */
        BSSLevelCodeEnum(String code, String name) {
            this.code = code;
            this.name = name;
        }

        /** The code map. */
        public static Map<String, String> codeMap = new HashMap<String, String>();
        static {
            for (int i = 0; i < values().length; i++) {
                codeMap.put(values()[i].code, values()[i].name);
            }
        }

        /**
         * Gets the code.
         * 
         * @return the code
         */
        public String getCode() {
            // TODO Auto-generated method stub
            return null;
        }

        /**
         * Gets the name.
         * 
         * @return the name
         */
        public String getName() {
            // TODO Auto-generated method stub
            return null;
        }

    }
}
